

diary 'flyfly.txt'
diary on;

X = 0:1000:50000;
Y = 0:1000:70000;
aa = length(X);
b = length(Y);
t= 0:1:360;
map =zeros(aa,b,2);
V1=100;
k=0.9;
L1=8000;
a=0.9;
%% 开始循环过程
for i=1:aa
for j=1:b

[t,xxyy] = ode45( @(t,y)fly_the_air(t,y,L1,k,V1,a),t,[X(i),Y(j),50000,50000,50000,20000]);
[status ,tt] = check_status(xxyy);

%  status 的状态
%  0 - 未知
% 1 - 拦截成功
% -1  ： 曲率不满足条件
% 2 ： 突围成功
 
    if status ==2
     map(i,j,1)= map(i,j,1)+1;
     disp(i)
     disp(j)
     disp("-----");
%     if(t>357)%恰好的情况
%          map(i,j,2)= map(i,j,2)+1;
%          disp("-----!!!!!!!!-----");
%     end
        panduan = 1;
    end
    if status ==1 || status ==-1
        panduan=0;
    end

end
end
diary off;